package com.ld.caodan.widget;

import android.content.Context;
import android.os.Handler;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;

import com.ld.caodan.activity.R;

/**
 * listView用到的bottomView
 * 
 * @author LD
 *
 * 下午02:48:41  2012-5-31
 */
public class FooterView extends LinearLayout{

	private TextView textView;
	private ProgressBar bar;
	private Runnable runnable;
	private Handler handler;
	private Context context;
	
	public FooterView(Context context) {
		this(context, null, null);
	}
	
	public FooterView(Context context,Handler receiver,Runnable runTask) {
		super(context,null);
		this.context = context;
		this.handler = receiver;
		this.runnable = runTask;
		init();
	}
	
	private void init() {
		LayoutInflater inflater = LayoutInflater.from(context);
		inflater.inflate(R.layout.footerview, this);
		textView = (TextView) findViewById(R.id.moreText);
		bar = (ProgressBar)findViewById(R.id.moreBar);
	}
	
	void setRunnable(Runnable runnable){
		
	}
	
	public void setText(String str){
		textView.setText(str);
	}
	
	public void showBar(){
		bar.setVisibility(VISIBLE);
	}
	
	public void hiddenBar(){
		bar.setVisibility(GONE);
	}

	
}
